package com.example.module_home.home.model.repository

import com.example.lib_net.RetrofitFactory
import com.example.lib_net.entity.ResponseEntity
import com.example.module_home.home.model.api.HomeApi
import com.example.module_home.home.model.entity.SimpleTypeEntity
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn

/**
 * @author yaotianxue
 * @description
 * @date 2025/2/25
 */
class HomeRepository {
    val api: HomeApi
    init {
        api= RetrofitFactory.getRetrofitFactory().create(HomeApi::class.java)
    }
    /**
     * 获取视频类型信息
     */
    suspend fun getSimpleType() = flow {
        emit(api.getSimpleType())
    }.flowOn(Dispatchers.IO)
}